<?PHP
if (is_array($entity)) {
    foreach ($entity as $entity_item) {
        ?>
        <input name="ajax_id" id="ajax_id" type="hidden" value="<?PHP echo $entity_item['cu_id']; ?>"/>
        <?php
    }
}
?>
<script src="<?php echo base_url(); ?>script/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script id="scriptInit" type="text/javascript">
    $(function () {
        oTable=$('#ListTable').dataTable({
            "bPaginate":false,
            "bLengthChange": false, 
            "bFilter":false,
            "bInfo":false,
            "oLanguage": {//语言国际化
                "sUrl": "script/DataTable/zh.text"
            }
        });
        //初始化Grid数据
        $.ajax({
            url:"<?php echo site_url(); ?>/customers/C_Customers_Edit/ajax_GetProduct/" + $("#ajax_id").val(),
            cache:false,
            success:function (result) {
                if (result != '') {
                    var dataObj = eval("(" + result + ")");
                    ;
                    $.each(dataObj, function (i, item) {
                        //填入grid
                        $('#ListTable').dataTable().fnAddData([
                            item.pt_id,
                            item.pt_name,
                            item.pt_num]
                    );
                    })
                }
            }
        });
    });
</script>
<div class="right01"><img src="content/images/04.gif"/> <a href="<?php echo site_url(); ?>/C_Main/index/">主页</a> &gt;
    <span>订单信息列表</span> &gt; <span>操作订单信息</span>
</div>
<div id="content">
    <div id="tabsCount">
        <table class="tables">
            <?PHP
            if (is_array($entity)) {
                foreach ($entity as $entity_item) {
                    ?>
                    <tr>
                        <td style=" width: 19%;">&nbsp;</td>
                        <td style=" width: 12%;">新郎：</td>
                        <td style=" width: 19%;"><?PHP echo $entity_item['cu_groom']; ?></td>
                        <td style=" width: 12%;">新娘：</td>
                        <td style=" width: 19%;"><?PHP echo $entity_item['cu_bride']; ?></td>
                        <td style=" width: 19%;">&nbsp;</td>
                    </tr>
                    <tr>
                        <td style=" width: 19%;">&nbsp;</td>
                        <td style=" width: 12%;">手机：</td>
                        <td style=" width: 19%;"><?PHP echo $entity_item['cu_cellphone']; ?></td>
                        <td style=" width: 12%;">固定电话：</td>
                        <td style=" width: 19%;"><?PHP echo $entity_item['cu_phone']; ?></td>
                        <td style=" width: 19%;">&nbsp;</td>
                    </tr>
                    <tr>
                        <td style=" width: 19%;">&nbsp;</td>
                        <td style=" width: 12%;">结婚日期：</td>
                        <td style=" width: 19%;"><?PHP echo $entity_item['cu_marrydate'] != '' ? $entity_item['cu_marrydate'] : date("Y-m-d"); ?>
                        </td>
                        <td style=" width: 12%;">取件日期：</td>
                        <td style=" width: 19%;"><?PHP echo $entity_item['cu_takedate'] != '' ? $entity_item['cu_takedate'] : date("Y-m-d"); ?>
                        </td>
                        <td style=" width: 19%;">&nbsp;</td>
                    </tr>
                    <tr>
                        <td style=" width: 19%;">&nbsp;</td>
                        <td style=" width: 12%;">地址：</td>
                        <td colspan="3">
                            <?PHP echo $entity_item['cu_address']; ?>
                        </td>
                        <td style=" width: 19%;">&nbsp;</td>
                    </tr>
                    <tr>
                        <td style=" width: 19%;">&nbsp;</td>
                        <td style=" width: 12%;">套系：</td>
                        <td style=" width: 19%;">
                            <?php
                            if (is_array($selectList)) {
                                foreach ($selectList as $list_item) {
                                    if ($list_item['se_id'] == $entity_item['se_id']) {
                                        ?>
                                        <?PHP echo $list_item['se_name']; ?>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                }
                            }
                            ?>
                        </td>
                        <td style=" width: 12%;">金额总计：</td>
                        <td style=" width: 19%;"><?PHP echo $entity_item['cu_total']; ?></td>
                        <td style=" width: 19%;">&nbsp;</td>
                    </tr>
                    <tr>
                        <td style=" width: 19%;">&nbsp;</td>
                        <td style=" width: 12%;">已付金额：</td>
                        <td style=" width: 19%;"><?PHP echo $entity_item['cu_paid']; ?></td>
                        <td style=" width: 12%;">未付金额：</td>
                        <td style=" width: 19%;"><?PHP echo $entity_item['cu_unpaid']; ?></td>
                        <td style=" width: 19%;">&nbsp;</td>
                    </tr>
                    <tr>
                        <td style=" width: 19%;">&nbsp;</td>
                        <td style=" width: 12%;">套系内容：</td>
                        <td style=" width: 19%;">&nbsp;</td>
                        <td style=" width: 19%;">&nbsp;</td>
                        <td style="text-align: right"></td>
                        <td style=" width: 19%;">&nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="6">
                            <table id="ListTable" class="tables">
                                <thead>
                                    <tr>
                                        <th>
                                            商品编号
                                        </th>
                                        <th>
                                            商品名称
                                        </th>
                                        <th>
                                            数量
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>

                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <?PHP
                }
            }
            ?>
        </table>
        <div style="margin-top: 2%;margin-bottom: 2%; margin-left: 35%;">
            <input class="button" type="button" name="resetbtn" onClick="resetButton()" value="返回"/>
        </div>
    </div>
</div>
<script type="text/javascript">
    //返回
    function resetButton() {
        window.location.href = "<?php echo site_url(); ?>/customers/C_Customers_List/";
    }
</script>